package com.cym.mapper;

import com.cym.entity.Employees;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【employees(员工基本信息表)】的数据库操作Mapper
* @createDate 2025-05-30 08:44:49
* @Entity com.cym.entity.Employees
*/
public interface EmployeesMapper {

    //查询所有员工数量
    int countByExample(Employees employees);

    Employees findByEmployeeNo(String employeeNo);

    List<Employees> findByNameOrDepartmentId(@Param("name") String name, @Param("departmentId") Integer departmentId);

    //查询所有员工的考勤次数
    List<Employees> findAllAttendanceCount();

    //删除离职状态员工的考勤记录
    int deleteAttendanceByStatus();

    //根据员工工号查询员工信息以及员工考勤信息
    Employees findByEmployeeNoAndAttendance(String employeeNo);

    //新建员工
    int insert(Employees record);

}
